<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>保管室信息管理</title>
<link rel="stylesheet" href="<%=path%>/easyui/themes/default/easyui.css"
	type="text/css" media="screen" />
<link rel="stylesheet" href="<%=path%>/easyui/themes/icon.css"
	type="text/css" media="screen" />
<link rel="stylesheet" href="<%=path%>/css/main.css" type="text/css"
	media="screen" />
<link rel="stylesheet" type="text/css" href="<%=path%>/css/Tooltip.css" />
<script src="<%=path%>/easyui/jquery-1.4.4.min.js"></script>
<script src="<%=path%>/easyui/jquery.easyui.min.js"></script>
<!-- mytab -->
<script src="<%=path%>/myjs/myTab.js"></script>
<!-- sys -->
<script src="<%=path%>/myjs/sys.js"></script>
<script src="<%=path%>/myjs/caseRoomManager.js"></script>
<script src="<%=path%>/easyui/easyMask.js"></script>
<script src="<%=path%>/easyui/easyUI.js"></script>
<script src="<%=path%>/easyui/easyLayer.js"></script>
<script src="<%=path%>/myjs/DatePicker/WdatePicker.js"></script>
<!-- validation -->
<!-- 
<script src="<%=path%>/validation/jquery.bgiframe.min.js"></script>
<script src="<%=path%>/validation/easy_validator.pack.js"></script>
 -->
<script>
	    var proPath = '<%=path%>';
		var greyLayer ;
		$(function(){
			grid = $('#tt').datagrid({
				url:'<%=path%>/caseRoom/getCaseRoomInfos',
			pagination : true,
			singleSelect : true,
			striped : true, //隔行换色
			rownumbers : true, //显示行号
			fit : true,//表格自动填充
			loadMsg : '正在努力为您加载，请稍作等待…',//加载信息
			toolbar : [ {
				text : '新增',
				iconCls : 'icon-add',
				handler : 'newCaseRoom'
			}, '-', {
				text : '修改',
				iconCls : 'icon-edit',
				handler : 'editCaseRoom'

			}, '-', {
				text : '删除',
				iconCls : 'icon-remove',
				handler : 'delCaseRoom'
			} ]
		});
		//初始化pagination工具开始
		var pagetool = $('#tt').datagrid('getPager');
		pagetool.pagination({
			beforePageText : '第',
			afterPageText : '页，共{pages}页',
			displayMsg : '显示从 {from} 到  {to} , 总记录 {total} '
		});
		//初始化pagination工具结束
		$('body').layout();
		$('#btn-save,#btn-cancel').linkbutton();
		win = $('#user-window').window({
			collapsible : false,
			minimizable : false,
			maximizable : true,
			closable : true,
			onClose : function() {
				greyLayer.close();
			},
			closed : true,
			cache : false
		});
		form = win.find('form');
		greyLayer = new easyMask(null, '100%', '100%', 100, '#000', 8, true);
	});
</script>
</head>
<body>
	<div id="window-center" region="center" fit="true"
		style="padding: 5px;">
		<table id="tt">
			<thead>
				<tr>
					<th field="room_name" width="200%">保管室名称</th>
					<th field="room_location" width="100%">保管室位置</th>
					<th field="room_companyDesc" width="300%">保管室所属单位</th>
					<th field="room_man" width="100%">保管室负责人</th>
					<th field="room_tel" width="100%">保管室联系电话</th>
					<th field="room_begin_date" width="100%">保管室启用时间</th>
					<th field="room_statusDesc" width="100%">保管室使用状态</th>
					<th field="room_coments" width="100%">保管室备注信息</th>
				</tr>
			</thead>
		</table>
	</div>
	<div id="user-window" title="保管室信息管理窗口"
		style="width: 400px; height: 450px;">
		<div style="padding: 20px 20px 40px 80px;">

			<form method="post">
				<table>
					<tr>
						<td>保管室名称：</td>
						<td><input name="room_name" class="easyui-validatebox"
							type="text" required="true"></input></td>
					</tr>
					<tr>
						<td>保管室位置：</td>
						<td><input name="room_location" class="easyui-validatebox"
							type="text" required="true"></input></td>
					</tr>
					<tr>
						<td>负责人：</td>
						<td><input name="room_man" class="easyui-validatebox"
							type="text"></input></td>
					</tr>
					<tr>
						<td>联系电话：</td>
						<td><input name="room_tel" class="easyui-validatebox"
							type="text"></input></td>
					</tr>
					<tr>
						<td>启用时间：</td>
						<td><input name="room_begin_date" class="easyui-validatebox"
							type="text" onClick="WdatePicker();"></input></td>
					</tr>
					<tr>
						<td>使用状态：</td>
						<td><input name="room_status" class="easyui-combobox"
							type="text" panelHeight="auto"
							url="<%=path%>/dicManager/getChildListByPcode?p_code=10"
							valueField="c_code" textField="c_name" ></input></td>
					</tr>
					<tr>
						<td>备注信息：</td>
						<td><textarea name="room_coments"
								style="height: 100px; width: 180px;" class="easyui-validatebox"></textarea>
						</td>
					</tr>
				</table>
			</form>

		</div>
		<div style="text-align: center; padding: 5px;">
			<a href="javascript:void(0)" onclick="saveCaseRoom()" id="btn-save"
				icon="icon-save">确定</a> <a href="javascript:void(0)"
				onclick="closeWindow()" id="btn-cancel" icon="icon-cancel">取消</a>
		</div>
	</div>
</body>
</html>
